package com.example.demo.result;

//枚举类
public enum Renum {
    //这里是可以自己定义的，方便与前端交互即可
    UNKNOWN_ERROR(-1,"未知错误"),
    SUCCESS(6,"成功"),             //一系列操作成功都可用
    USER_NOT_EXIST(1,"用户不存在"),
    USER_IS_EXISTS(2,"用户已存在"),
    USER_PWD_ERROR(3,"用户密码错误"),
    ACCOUNT_ERROR(4,"输入账户错误"),
    CHECK_CODE_ERROR(5,"验证码错误"),
    ERROR(7,"设置失败"),
    TWO_PASSWORD_ERROR(8,"两次密码不同"),
    ADD(9,"返回")
    ;
    private Integer code;
    private String message;

    Renum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
